/**
 * Copyright (c) 2012 Axa Holding Belgium, SA. All rights reserved.
 * This software is the confidential and proprietary information of the AXA Group.
 */
package chabernac.android.wordbattle.model;

import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.Set;

public class Game {
  private LinkedHashSet<Player> myPlayers = new LinkedHashSet<Player>();
  private long myPlayTime = 0;
  
  public Game(Player aLocalPlayer){
    myPlayers.add(aLocalPlayer);
  }
  
  public void addPlayer(Player aPlayer){
    myPlayers.add(aPlayer);
  }
  
  public Set<Player> getPlayers(){
    return Collections.unmodifiableSet( myPlayers );
  }
  
  public Player getLocalPlayer(){
    return myPlayers.iterator().next();
  }

  public long getPlayTime() {
    return myPlayTime;
  }

  public void setPlayTime( long aPlayTime ) {
    myPlayTime = aPlayTime;
  }
}
